/**
 * Created by yuweimei on 2018/5/2.
 */
app.controller('account-management', function($scope, $http) {
	//证书
	var token = localStorage.getItem('token');
	$scope.logout = function() {
		if(!token) {
			$.toast("亲，您还未登录");
			location.href = '#personal-center';
			return;
		}

		$.confirm('你确定注销吗？', '', function() {
			if(token) {
				localStorage.removeItem("token");
				$.toast('已注销');
				location.href = '#home';
			}

		}, function() {
			$.toast('已取消')
		});

	};
	$scope.getAboutUs = function() {
		location.href = '#aboutus';
	}

});